from django.db import models
from staff_management.models import Employee
# Create your models here.
# 工资表
class Salary(models.Model):
    emp_id = models.ForeignKey(Employee,on_delete=models.CASCADE)
    basic = models.DecimalField('基本工资',max_digits=10,decimal_places=2,blank=False)
    merit = models.DecimalField('绩效工资',max_digits=10,decimal_places=2)
    insurance_and_housing_fund = models.DecimalField('五险一金',max_digits=10,decimal_places=2,blank=False)
    overtime_pay = models.DecimalField('加班费',max_digits=10,decimal_places=2)
    cashier_number = models.CharField('出纳编号',max_length=32)
    provide_date = models.DateField('日期',default='0000-00-00',blank=False)
    notes = models.CharField('备注',max_length=32)

class Overtime(models.Model):
    # overtime = models.IntegerField('加班时长')
    start_time = models.DateTimeField('上班打卡时间')
    end_time = models.DateTimeField('上班打卡时间')
    state=models.CharField("状态",max_length=30)
    emp_id = models.ForeignKey(Employee,on_delete=models.CASCADE)




